class Solution {
public:
    int MoreThanHalfNum_Solution(vector<int> numbers) {
        sort(numbers.begin(),numbers.end());
        int fast = 0,slow = 0;
        int len = numbers.size();
        while(fast < len){
            if(numbers[fast] != numbers[slow]){
                if(fast - slow > len / 2){
                    return numbers[slow];
                }else{
                    slow = fast;
                }
            }else{
                fast++;
            }
        }
        return numbers[fast - 1];
    }
};
